module(
    name = "protobuf",
    compatibility_level = 1,
    version = "21.7",
)

bazel_dep(name = "bazel_skylib", version = "1.0.3")
bazel_dep(name = "rules_python", version = "0.10.2")
bazel_dep(name = "rules_cc", version = "0.0.1")
bazel_dep(name = "rules_proto", version = "4.0.0")
bazel_dep(name = "rules_java", version = "4.0.0")
bazel_dep(name = "rules_pkg", version = "0.7.0")
bazel_dep(name = "abseil-cpp", repo_name = "com_google_abseil", version = "20211102.0")
bazel_dep(name = "zlib", version = "1.2.11")
bazel_dep(name = "upb", version = "0.0.0-20220923-a547704")

# TODO: Add missing rules_kotlin

# Maven dependencies
bazel_dep(name = "rules_jvm_external", version = "4.4.2")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")

maven.install(
    name = "maven",
    artifacts = [
        "com.google.code.findbugs:jsr305:3.0.2",
        "com.google.code.gson:gson:2.8.9",
        "com.google.errorprone:error_prone_annotations:2.3.2",
        "com.google.j2objc:j2objc-annotations:1.3",
        "com.google.guava:guava:31.1-jre",
        "com.google.guava:guava-testlib:31.1-jre",
        "com.google.truth:truth:1.1.2",
        "junit:junit:4.13.2",
        "org.mockito:mockito-core:4.3.1",
    ],
)

use_repo(maven, "maven")

# Dependencies needed in tests
bazel_dep(name = "googletest", repo_name = "com_google_googletest", version = "1.11.0")
